<!DOCTYPE HTML>
<html lang="zh-cn">
  <head>
  	<meta charset="UTF-8">
    <title>Powerful JQuery Plugins</title>
    <link href="/js/jQueryUI/jquery-ui.css" type="text/css" rel="stylesheet"></link>
    <link href="/js/jQueryScrollbar/perfect-scrollbar.css" type="text/css" rel="stylesheet"></link>
  </head>
  
  <body>
  	<a href="http://jquery.com">jQuery</a>
  	<form>
  		<fieldset title="字段集合" style="text-align:center" disabled="disabled">
  				<legend>注册信息</legend>
	  			<input name="username" type="text" value="用户名">
	  	</fieldset>
	  	<fieldset title="字段集合" style="text-align:left" disabled="disabled">
	  		<legend>爱好</legend>
	  		<input name="hobby" type="checkbox" value="sing">唱歌
	  		<input name="hobby" type="checkbox" value="dance">跳舞
	  		<input name="hobby" type="checkbox" value="swim">游泳
	  		<input name="hobby" type="checkbox" value="game"  disabled="disabled">游戏
	  	</fieldset>
	  	<fieldset style="text-align:right">
	  		<legend>下拉选项</legend>
	  		<select>
	  			<option>唱歌</option>
	  			<option>跳舞</option>
	  			<option disabled="disabled">游泳</option>
	  			<option>游戏</option>
	  		</select>
  		</fieldset>
  	</form>
  	<script src="/js/jQuery/jquery-1.11.3.js" type="text/javascript"></script>
  	<script src="/js/jQueryUI/jquery-ui.js" type="text/javascript"></script>
  	<script src="/js/jQueryValidation/jquery.validate.js" type="text/javascript"></script>
  	<script src="/js/jQueryValidation/messages_zh.js" type="text/javascript"></script>
  	<script src="/js/jQueryValidation/additional-methods.js" type="text/javascript"></script>
  	<script src="/js/jQueryValidation/additional-methods.js" type="text/javascript"></script>
  	<script src="/js/jQueryScrollbar/perfect-scrollbar.jquery.js" type="text/javascript"></script>
  	<script type="text/javascript">
  		$(document).ready(function() {
  			//取得表单中所有添加了disabled属性的表单元素
  			//如果在fieldset添加了disabled属性那么fieldset的子元素中的表单元素也会默认被当成添加了disabled元素
  			console.log($("form :disabled").length);
  			//所有没被添加disabled的元素，都会取出来fieldset也会被当成元素取出来
  			console.log($("form :enabled").length);
  			//会取出所有的<input>, <textarea>, <select>, <button>的元素
  			console.log($("form :input").length);
  			//会取出select的元素
  			console.log($("form :selected").length);
  		});
  	</script>
  </body>
</html>
